//
//  YLConfigItem.m
//  YLProject
//
//  Created by 张伯林 on 2018/1/28.
//  Copyright © 2018年 WY. All rights reserved.
//

#import "YLConfigItem.h"
//#import "IQKeyboardManager.h"
#import "CustomImage.h"

//融云的AppKey
#define RCIM_CHAT_APPKEY @"mgb7ka1nmwk4g"
//网易云直播的AppKey
#define LSM_LIVE_APPKEY @""
@implementation YLConfigItem
+(void)initializeInfomation{
    //键盘管理
//    IQKeyboardManager *manager = [IQKeyboardManager sharedManager];
//    manager.enable = YES;
//    manager.shouldShowToolbarPlaceholder = NO;
//    manager.toolbarDoneBarButtonItemText = @"完成";
    
    /**
     *  status Bar
     */
    [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
    
    /**
     * Navigation BackgroundColor
     */
    [[UINavigationBar appearance] setBackgroundImage:[CustomImage imageWithColor:kHEXCOLOR(@"#ffffff") size:CGSizeMake([[UIScreen mainScreen] currentMode].size.width, YL_NAV_HEIGHT)]  forBarMetrics:UIBarMetricsDefault];
    
    /**
     *  Navigation Title Color
     */
    [[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor blackColor], NSForegroundColorAttributeName,nil]];
    
    /**
     *  统一导航条系统返回按钮图片，并通过偏移隐藏标题
     */
    //    UIImage *backImage = [[UIImage imageNamed:@"back_arrow_two"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 30, -150, 0)];
    //    [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
    //    [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60)
    //                                                         forBarMetrics:UIBarMetricsDefault];
    
    [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(-150, 0) forBarMetrics:UIBarMetricsDefault];
    [[UINavigationBar appearance] setTintColor:kHEXCOLOR(@"333333")];
}
@end
